/* ============================================
   CouponHunterHub — Blog View
   Style: Professional News / Ad-Revenue Site
   Fonts: Merriweather + Source Sans 3
   ============================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
    --red:        #c0392b;
    --red-dark:   #922b21;
    --red-light:  #fdf2f2;
    --blue:       #1a3c5e;
    --blue-mid:   #2471a3;
    --ink:        #111111;
    --ink-2:      #2c2c2c;
    --ink-3:      #555555;
    --ink-4:      #888888;
    --surface:    #ffffff;
    --surface-2:  #f5f5f5;
    --surface-3:  #efefef;
    --border:     #ddd;
    --border-2:   #ccc;
    --ad-bg:      #f9f9f0;
    --ad-border:  #e0dfc0;
    --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
    --font-sans:  'Source Sans 3', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   SITE CONTAINER
   ========================================= */

.site-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================================
   AD BAR (TOP / BOTTOM)
   ========================================= */

.ad-bar {
    background: var(--ad-bg);
    border-bottom: 1px solid var(--ad-border);
    padding: 8px 0;
}

.ad-bar--bottom {
    border-top: 1px solid var(--ad-border);
    border-bottom: none;
    margin-top: 32px;
}

.ad-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.ad-label {
    font-size: 10px;
    font-family: var(--font-sans);
    color: var(--ink-4);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.ad-placeholder {
    background: var(--ad-bg);
    border: 1px dashed var(--ad-border);
    color: var(--ink-4);
    font-size: 12px;
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
}

.ad-slot--leaderboard .ad-placeholder {
    width: 728px;
    max-width: 100%;
    height: 90px;
}

.ad-placeholder--tall {
    width: 300px;
    height: 600px;
    flex-direction: column;
    gap: 4px;
}

.ad-placeholder--tall small {
    font-size: 10px;
    color: var(--red);
    font-weight: 600;
}

/* =========================================
   BREADCRUMB
   ========================================= */

.breadcrumb-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 9px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-4);
}

.breadcrumb a {
    color: var(--blue-mid);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb .active { color: var(--ink-3); }

.breadcrumb svg { color: var(--ink-4); flex-shrink: 0; }

/* =========================================
   PAGE LAYOUT (2 column)
   ========================================= */

.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    padding-top: 24px;
    padding-bottom: 40px;
    align-items: start;
}

/* =========================================
   ARTICLE COLUMN
   ========================================= */

.article-col {
    min-width: 0;
}

/* Article Header */
.article-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    padding: 28px 32px 20px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 14px;
}

.tag--featured {
    background: var(--red);
    color: #fff;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: var(--ink);
    line-height: 1.18;
    margin-bottom: 20px;
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.byline-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.byline-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.byline-author {
    font-size: 14px;
    color: var(--ink-2);
}

.byline-author strong { font-weight: 700; }

.byline-meta {
    font-size: 13px;
    color: var(--ink-4);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border-2);
    border-radius: 3px;
    background: var(--surface);
    color: var(--ink-2);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.share-btn:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* Hero Image */
.article-hero-img {
    background: var(--surface);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.article-hero-img img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Inline Ad */
.ad-slot-inline {
    background: var(--ad-bg);
    border: 1px solid var(--ad-border);
    border-top: none;
    padding: 10px 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ad-slot-inline .ad-placeholder {
    width: 300px;
    max-width: 95%;
    height: 250px;
}

.ad-slot-inline--mid .ad-placeholder {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

/* Lead */
.article-lead {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    padding: 24px 32px;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 400;
    color: var(--ink-2);
    line-height: 1.7;
    border-left: 4px solid var(--red);
}

.article-lead p { margin: 0; }

/* Article Body */
.article-body {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    padding: 28px 32px 32px;
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--ink-2);
    line-height: 1.9;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--ink);
    margin: 32px 0 12px;
    line-height: 1.3;
}

.article-body h2 { font-size: 1.55rem; border-bottom: 2px solid var(--red); padding-bottom: 8px; }
.article-body h3 { font-size: 1.25rem; }
.article-body h4 { font-size: 1.05rem; }

.article-body p { margin-bottom: 22px; }
.article-body p:last-child { margin-bottom: 0; }

.article-body a {
    color: var(--blue-mid);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover { color: var(--red); }

.article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px 0;
    border: 1px solid var(--border);
}

.article-body ul,
.article-body ol {
    padding-left: 26px;
    margin-bottom: 22px;
}

.article-body li { margin-bottom: 8px; }

.article-body blockquote {
    margin: 24px 0;
    padding: 18px 24px;
    border-left: 4px solid var(--red);
    background: var(--red-light);
    font-style: italic;
    font-size: 18px;
    color: var(--ink);
}

.article-body blockquote p { margin: 0; }

.article-body strong { font-weight: 700; color: var(--ink); }

.article-body code {
    background: var(--surface-3);
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--red-dark);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-family: var(--font-sans);
    font-size: 15px;
}

.article-body th {
    background: var(--blue);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
}

.article-body td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
}

.article-body tr:nth-child(even) td { background: var(--surface-2); }

/* Article Footer Meta */
.article-footer-meta {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-top: 2px solid var(--red);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-4);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-right: 6px;
}

.article-footer-meta time {
    font-size: 14px;
    color: var(--ink-3);
    font-family: var(--font-sans);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--red);
    color: #fff;
    border-radius: 3px;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    transition: background 0.18s;
}

.btn-back:hover { background: var(--red-dark); }

/* =========================================
   SIDEBAR
   ========================================= */

.sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border);
}

.widget--ad {
    background: var(--ad-bg);
    border-color: var(--ad-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 10px;
    gap: 4px;
}

.widget--author {
    padding: 16px;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-name {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.author-role {
    font-size: 13px;
    color: var(--ink-4);
    font-family: var(--font-sans);
}

/* Newsletter Widget */
.widget--newsletter {
    padding: 20px 18px;
    background: var(--blue);
    border-color: var(--blue);
}

.widget--newsletter h4 {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.widget--newsletter p {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 14px;
    line-height: 1.5;
}

.widget--newsletter input[type="email"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    font-family: var(--font-sans);
    margin-bottom: 8px;
    outline: none;
}

.widget--newsletter input::placeholder { color: rgba(255,255,255,0.5); }

.widget--newsletter button {
    width: 100%;
    padding: 9px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
}

.widget--newsletter button:hover { background: var(--red-dark); }

/* =========================================
   NOT FOUND
   ========================================= */

.not-found {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 32px;
    background: var(--red-light);
    border: 1px solid #f1c0c0;
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--red-dark);
}

.not-found a { color: var(--red); font-weight: 700; }

/* =========================================
   RESPONSIVE — TABLET ≤900px
   ========================================= */

@media(max-width:900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-col {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .ad-placeholder--tall {
        height: 250px;
    }

    .ad-slot--leaderboard .ad-placeholder {
        width: 100%;
        max-width: 468px;
    }
}

/* =========================================
   RESPONSIVE — MOBILE ≤600px
   ========================================= */

@media(max-width:600px) {
    .article-header,
    .article-lead,
    .article-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .article-footer-meta {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .article-title { font-size: 1.45rem; }

    .article-body { font-size: 16px; }

    .article-body h2 { font-size: 1.25rem; }

    .breadcrumb li:not(:last-child):not(:nth-last-child(2)) {
        display: none;
    }

    .ad-slot--leaderboard .ad-placeholder {
        width: 320px;
        height: 50px;
    }

    .sidebar-col {
        grid-template-columns: 1fr;
    }
}